#ifndef DAY_H
#define DAY_H
#include "Appointment.h"
#include <map>
#include <string>
using namespace std;
typedef time hour;

// enumerates the days of a week
typedef enum{
	SUNDAY = 0,
	MONDAY,
	TUESDAY,
	WEDNESDAY,
	THURSDAY,
	FRIDAY,
	SATURDAY,
	NUM_OF_DAYS,
} day_t;


//
// Class Day
// represents a day in a diary, 
// holds the appointments of that day 
//
class Day{
public:
	Day(day_t day);
	Day(const Day& day);
	~Day();
	const Day& operator=(const Day& day);
	day_t getDay() const;
	virtual bool makeAppointment(hour startHour, hour endHour, string& subject);
	virtual void removeAppointment(hour startHour);	
	virtual bool moveAppointment(hour startHour, hour newStartHour);
	virtual Appointment* findAppointment(hour startHour)const;
	virtual Appointment* getFirstAppointment() const; 
private:
	day_t currentDay; 
	map<hour,Appointment,timeComparator> appointments;	
};
#endif